;;用空格代替tab
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2)

;;c-mode
;https://xhcoding.cn/post/20211222180104-emacs%E7%BC%A9%E8%BF%9B%E8%AE%BE%E7%BD%AE/
;(add-to-list 'c-default-style '(c++-mode . "k&r"))
;(add-to-list 'c-default-style '(c-mode . "k&r"))


;;python-mode
(add-hook 'python-mode-hook
          (function (lambda ()
                      (setq indent-tabs-mode nil
                            tab-width 2
                            python-indent-offset 2))))


;;auto-save
(require 'auto-save)
(auto-save-enable)
(setq auto-save-silent t)

(provide 'init-mode)
